<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

{# Copyright (C) 2010  Trinity Western University #}

{% load tab_active %}
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
    <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/cube.css" />
    <title>{% block title %}{% endblock %} - The Cube Online</title>
    <script type="text/javascript" src="{{ MEDIA_URL }}js/cube.js"></script>
</head>

<body>
    <div id="container">
        <div id="header">
            {% block header %}
            <h1><a href="{% url list %}" title="Home">The Cube Online</a></h1> 
            {% endblock %}
        </div><!--End Header-->

{% url list as list_url %}
{% url my_books as my_books_url %}
{% url staff as staff_url %}
{% url help as help_url %}
{% url reports_menu as reports_url %}
{% url add_book as add_url %} 

        <div id="navigation">
            <ul>
                {% block navigation %}
                {% spaceless %}
                <li id="list">
                    <a href="{% url list %}" class="{% tab_active request list_url %}">
                        <span>List Books</span>
                    </a>
                </li>
                {% endspaceless %}
                {% spaceless %}
                <li id="my">
                    <a href="{% url my_books %}" class="{% tab_active request my_books_url %}">
                     
                        <span>My Books</span>
                    </a>
                </li>
                {% endspaceless %}

                {% if user.is_staff %}
                {% spaceless %}

                <li id="add">
                    <a href="{% url add_book %}" class="{% tab_active request add_url %}">
                        <span>Add Book</span>
                    </a>
                </li>
                {% endspaceless %}
                {% spaceless %}
                <li id="staff">
                    <a href="{% url staff %}" class="{% tab_active request staff_url %}">
                        <span>Staff</span>
                    </a>
                </li>
                {% endspaceless %}
                {% spaceless %}
                <li id="reports">
                    <a href="{% url reports_menu %}" class="{% tab_active request reports_url %}">
                        <span>Reports</span>
                    </a>
                </li>

                {% endspaceless %}
                {% endif %}

                {% spaceless %}
                <li id="help">
                    <a href="{% url help %}" class="{% tab_active request help_url %}">
                        <span>Help</span>
                    </a>
                </li>
                {% endspaceless %}
                {% spaceless %}
                <li id="log">
                    <a href="{% url twupass-logout %}">
                        <span>Log Off</span>
                    </a>
                </li>
                {% endspaceless %}
                {% endblock %}
            </ul>
        </div><!--End Navigation-->
        <div id="user">
            <p>
                You are logged in as<br />
		<a href="{% url profile %}">
			{{ request.user.get_full_name }}
		</a>
            </p>
        </div>
        <div id="content">
            {% block content %}{# TODO we need anything here? #}{% endblock %}
        </div><!--End Content-->

        <div id="footer">
            {% block footer %}
            <p>
                Brought to you by
                <a href="http://www.twusa.ca">TWUSA</a> <br />
            </p>
            {% endblock %}
        </div><!--End Footer-->
    </div><!-- End Container-->
</body>
</html>
